Repository navigation
fix(id): grant INPUT scope in world_bench guest_replay journal (#8316) - #9995
Conversation
bench_guest_replay issued its synthetic participant JOIN|CHAT only, then hand-built a journal of Committed Input events from that participant. WorldCore::restore validates each event kind against the participant scopes in the Issued entry, so restore refused the first committed event (sequence 1) and the whole bench died before many_worlds could run. Issue the guest scope set (JOIN|CHAT|INPUT) in both the capability and the constructed Issued entry. The restore validator is correct (restore_refuses_* tests pin it); the harness journal was one no real writer could produce.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 24 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Fixes #8316.
Diagnosis (writer vs reader, as the issue asked)
The bench harness is at fault; the restore validator is correct.
bench_guest_replayissues its synthetic participant with scopesJOIN | CHAT, hand-builds the journal'sIssuedentry with those same scopes, then appendsCommittedInput events from participant 1.WorldCore::restorevalidates each event kind against the participant's scopes in theIssuedentry (behavior pinned byrestore_refuses_input_and_chat_without_the_matching_scope), so it refuses the first committed event:journal event at sequence 1 uses participant 1 without INPUT scope. No real writer can produce that journal — submitting input through the public API requires the INPUT scope at write time. The bench has been broken since the restore scope validation landed; becauseguest_replayruns third of six,many_worldsnever ran, which is what blocks the #7064 measurement and #8239 verification.Change
pkgs/id/benches/world_bench.rsonly: issue the participant withWorldScopes::GUEST(JOIN|CHAT|INPUT) and record the same set in the constructedIssuedentry; comment updated to name the scope validation. No product code changed.Verification (laptop, this branch)
cargo bench -p id --bench world_bench -- --only guest_replay(full size, 10,000 events × 5 reps):bench guest_replay unit=us_per_event median=0.821— passes.--quick: all six stages complete, includingbench many_worlds … p99_ms=9.130 target_p99_ms=50 target_met=trueandfuel_spin_isolation … target_met=true.Queue: task 15288 (triage, fix done in-claim — effort/s, fully diagnosed), lane code-a.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.